package com.itheima.idea.array;

import java.util.ArrayList;

public class Dmo1ArrayLIst {
    public static void main(String[] args) {
        //1.创建集合容器对象
        ArrayList<String> list = new ArrayList<>();
        //ArrayList<> list = new ArrayList<>();
        //2.调用对象的add方法,向容器中添加数据
        list.add("111");
        list.add("222");
        list.add("333");
        list.add("444");
        list.add("吴亦凡");
        list.add("林俊杰");

        //插队添加所允许的插入索引范围
        list.add(0,"234");
        list.add(0,"罗志祥");
        System.out.println(list);

    }
}
